﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Diagnostics;
using System.Xml;

namespace SimpleIR
{
	/// <summary>
	/// This class is an abstract base class for all the regions in out T1T2 basic block construction.
	/// </summary>
	public abstract class IRT1T2Region
	{
		/// <summary>
		/// Number the stmts and flow structures in the region.
		/// </summary>
		public abstract void NumberRegion(CtrGen cg);

		/// <summary>
		/// Get the min statement number appearing in the region.
		/// </summary>
		public abstract int MinStmt();

		/// <summary>
		/// Get the max statement number appearing in the region (or the region id if it is the largest).
		/// </summary>
		public abstract int MaxStmt();

		/// <summary>
		/// Load this call graph chunk for display as a dgml graph.
		/// </summary>
		public abstract void DGMLDisplayString(XmlWriter xwn, XmlWriter xwl, bool toplevel);

		/// <summary>
		/// Generate the unique dgml name for this node.
		/// </summary>
		public abstract string GenDisplayNameString();
	}
}
